package code.main.view.hall
{
	import code.common.assets.AssetsClassName;
	import code.debug.DebugCtrl;
	import code.main.modle.lang.Language;
	import code.module.userList.UserListView;
	
	import com.bit101.components.List;
	import com.yy.manager.ResourceManager;
	import com.yy.tools.graphics.GT;
	import com.yy.ui.controls.Button;
	import com.yy.ui.controls.ScaleButton;
	import com.yy.ui.uiconst.Direction;
	
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	/**
	 *大厅面板 
	 * @author YY
	 * 
	 */
	public class HallView extends Sprite
	{
		private var _hallViewUi:MovieClip;//大厅资源
		
		public var hallBg:Sprite;//大厅背景
		public var enterBtn:Button;//进入房间按钮
		public var refreshBtn:Button;//刷新列表按钮
		public var list:List;//列表
		public var nameTxt:TextField;//名字
		public var moneyLabel:TextField;//金币
		public var pic:MovieClip;//图片
		public var vip:MovieClip;//vip标识
		public var userListView:UserListView;//用户列表显示
		public function HallView()
		{
			var dobj:DisplayObject;
			hallBg = ResourceManager.getSpriteByName(AssetsClassName.HALL_BG);
			dobj = addChild(hallBg);
			
			_hallViewUi = ResourceManager.getMovieClipByName(AssetsClassName.HALL_VIEW_UI);
			addChild(_hallViewUi);
			
			enterBtn = new Button(_hallViewUi.roomListUi.enterBtn);
			enterBtn.mouseChildren = false;
			_hallViewUi.roomListUi.enterBtn.label.text = Language.HALL_UI_CONTENT[1];
			_hallViewUi.roomListUi.addChild(enterBtn);
			refreshBtn = new Button(_hallViewUi.roomListUi.refreshBtn);
			refreshBtn.mouseChildren = false;
			_hallViewUi.roomListUi.refreshBtn.label.text = Language.HALL_UI_CONTENT[0];
			_hallViewUi.roomListUi.addChild(refreshBtn);
			pic = _hallViewUi.infoMc.pic;
			nameTxt = _hallViewUi.infoMc.nameTxt;
			moneyLabel = _hallViewUi.infoMc.moneyLabel;
			vip = _hallViewUi.infoMc.vip;
			vip.gotoAndStop(1);
			list = new List(this, 75, 194);
			list.autoHideScrollBar = true;
			list.listItemClass = RoomListItem; 
			list.setSize(400, 180);
			
			userListView = new UserListView();
			dobj = addChild(userListView);
			dobj.x = 537;
			dobj.y = 151;
		}
	}
}